package com.mobile.service.inter;

import com.mobile.service.dto.WorkOrderDTO;
import com.mobile.service.dto.WorkOrderQueryDTO;
import com.mobile.service.entity.WorkOrder;
import com.mobile.util.PageResult;

import java.util.List;
import java.util.Map;

/**
 * 工单表Service接口
 */
public interface WorkOrderService {

    /**
     * 新增工单
     */
    Map<String, Object> addWorkOrder(WorkOrderDTO dto) throws Exception;

    /**
     * 分页获取工单列表
     */
    PageResult<WorkOrderDTO> getWorkOrderListPage(WorkOrderQueryDTO queryDTO) throws Exception;

    /**
     * 根据主键获取工单信息
     */
    WorkOrderDTO getWorkOrderById(Integer id) throws Exception;

    /**
     * 修改工单信息
     */
    Map<String, Object> updateWorkOrder(WorkOrderDTO dto) throws Exception;

    /**
     * 根据主键删除工单
     */
    Map<String, Object> removeWorkOrder(Integer id) throws Exception;

    /**
     * 条件查询工单列表
     */
    List<WorkOrderDTO> getWorkOrderList(WorkOrderQueryDTO queryDTO) throws Exception;

    /**
     * 根据主键获取工单实体
     */
    WorkOrder getWorkOrderEntityById(Integer id) throws Exception;

    /**
     * 更新工单实体
     */
    void updateWorkOrder(WorkOrder workOrder) throws Exception;

    WorkOrderDTO getWorkOrderStatistics();
}
